#include <stdio.h>

int main(void)
{
    float height_cm, height_inch;
    int height_feet;

    printf("Enter a height in centimeters: ");
    scanf("%f", &height_cm);
    while (height_cm > 0)
    {
        height_feet = height_cm / 30.48; // 求出英尺数 整数
        height_inch = (height_cm - height_feet * 30.48) / 2.54;
        printf("%.1f cm = %d feet, %.1f inches\n", height_cm, height_feet, height_inch);
        printf("Enter a height in centimeters (<=0 to quit): ");
        scanf("%f", &height_cm);
    }
    printf("bye\n");
    
    return 0;
}